import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/birthday',
  component: Layout,
  redirect: '/birthday/index',
  name: 'birthday',
  meta: {
    title: '生日礼',
    icon: 'cil:birthday-cake',
  },
  children: [
    {
      path: 'index',
      name: 'birthdayIndex',
      component: () => import('@/views/birthday/index.vue'),
      meta: {
        title: '活动列表',
      },
    },
    {
      path: 'detail',
      name: 'birthdayDetail',
      component: () => import('@/views/birthday/detail.vue'),
      meta: {
        title: '生日礼活动配置',
        menu: false,
        activeMenu: '/birthday/index',
      },
    },
    {
      path: 'birthdayuserList',
      name: 'birthdayuserList',
      component: () => import('@/views/birthday/userList.vue'),
      meta: {
        title: '用户列表',
      },
    },
  ],
}

export default routes
